import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Index from '../views/Index.vue'
import UserQuery from '../views/user/UserQuery.vue'
import UserAdd from '../views/user/UserAdd.vue'
import UserUpdate from '../views/user/UserUpdate.vue'
import Outpatient from '../views/outpatient.vue'
import OutpatientHomePage from '../views/outpatient01/OutpatientHomePage.vue'
import InspectionApplication from '../views/outpatient01/inspectionApplication.vue'
import OutpatientDiagnosis from '../views/outpatient01/OutpatientDiagnosis.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/Outpatient'
  },
  {
    path: '/Login',
    name: 'Login',
    component: Login,
  },
  {
    path: '/Index',
    name: 'Index',
    component: Index,
	children:[
		{
			path:'/user/query',
		    name:'UserQuery',
		    component:UserQuery
		},
		{
			path:'/user/add',
		    name:'UserAdd',
		    component:UserAdd
		},
		{
			path:'/user/update',
		    name:'UserUpdate',
		    component:UserUpdate
		},
	]
  },
  {
	  path:'/Outpatient',
	  name:'Outpatient',
	  component: Outpatient,
	  children:[
		  {
			path:'/outpatient01/outpatienthomepage',
			name:'OutpatientHomePage',
			component:OutpatientHomePage
		},
		{
			path:'/outpatient01/inspectionApplication',
			name:'InspectionApplication',
			component:InspectionApplication
		},
		{
			path:'/outpatient01/outpatientDiagnosis',
			name:'OutpatientDiagnosis',
			component:OutpatientDiagnosis
		}
	  ]
  }
]

const router = new VueRouter({
  routes
})

export default router
